<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>显示转换Boolean类型</title>
</head>
<body>
    <script>
        let num = 435;
        console.log(!!num);
        console.log(Boolean(num));


        let str = "kjfgksdlg";
        console.log(!!str);
        console.log(Boolean(str));

        let arr = [];
        console.log(!!arr);
        console.log(Boolean(arr));

        let obj = {};
        console.log(!!obj);
        console.log(Boolean(obj))
    </script>
</body>
</html>